package com.lagou.demo.factory;

import com.lagou.demo.dao.StudentDao;
import com.lagou.demo.dao.StudentDaoImp;
import com.lagou.demo.dao.UserDao;
import com.lagou.demo.dao.UserDaoImp;

public class DaoFactory {

    /**
     * 通过静态工程方法模式来实现UserDao实现类对象的创建并返回
     * @return
     */

    //登陆方法
    public static UserDao getUserDao() {
        return new UserDaoImp();
    }
    //学生增删改查业务
    public static StudentDao getStudentDao(){
        return new StudentDaoImp();
    }
}
